import { FC } from 'react';
import { Button, Result } from 'antd';
import { useNavigate } from 'react-router-dom';

const NotFound: FC<{}> = () => {
  const navigate = useNavigate();
  type CSSProperties = { [key: string]: string };
  const styleFor404: CSSProperties = {
    margin: '100px 0 0'
  }
  return (
    <Result
      status="404"
      title="没有找到页面哦~~~"
      subTitle="404~404~404~404~404~404~404~"
      style={styleFor404}
      extra={
        <Button type="primary" onClick={() => navigate('/Home', { replace: true })}>
          返回首页
        </Button>
      }
    />
  );
};

export default NotFound;
